package com.agilegroup.crm.requests;

import static com.agilegroup.crm.utils.CONSTANTS.singlecallsURL;

import java.util.ArrayList;

import com.agilegroup.crm.model.Call;
import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

public class ViewCallJsonRequest extends SpringAndroidSpiceRequest<Call>{

	private ArrayList<String>parameters;
	
	public ViewCallJsonRequest(ArrayList<String>parameters) {
		super(Call.class);
		this.parameters=parameters;
	}
	
	@Override
	public Call loadDataFromNetwork() throws Exception {
		return getRestTemplate().getForObject(singlecallsURL+"id="+parameters.get(0)+"/empId="+parameters.get(1)+".json", Call.class);
	}
}
